home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: mjudge@ix.netcom.com(Michael Judge )
- Newsgroups: comp.lang.c++
- Subject: Re: mixing static and const qualifiers for class members
- Date: 13 Mar 1996 16:52:26 GMT
- Organization: Netcom
- Message-ID: <4i6uga$67v@cloner3.netcom.com>
- References: <4i6mu3$pmg@halon.vggas.com>
- NNTP-Posting-Host: bst-ma3-13.ix.netcom.com
- X-NETCOM-Date: Wed Mar 13 8:52:26 AM PST 1996
-
- In <4i6mu3$pmg@halon.vggas.com> JYoungman@vggas.com (James Youngman)
- writes:
- >
- >How do I declare and initialise a one-per-class constant? I want to
- do
- >something like this:
- >
- >class Foo
- >{
- > static const int nPositions = 6;
- > int nData[nPositions];
- >}
- >
- >...how is this done?
- >James.
- >
-
- class Foo
- {
- enum {nPositions=6};
- int nData[nPositions];
- };
-
- Michael Judge
- mjudge@ix.netcom.com
-